<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4">
<head>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
    <!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
    <meta name="description" content=""/>
    <meta name="author" content=""/>
    <title th:text="#{login.title.text}">AnAn认证中心</title>
    <link href="css/bootstrap.min.css" rel="stylesheet"/>
    <link href="css/login.css" rel="stylesheet"/>
    <link href="css/font-awesome.min.css" rel="stylesheet"/>
    <!--<script type="text/javascript" src="webjars/bootstrap/js/bootstrap.min.js"></script>-->
    <script type="text/javascript" src="js/jquery.min.js"></script>
    <script type="text/javascript" src="js/jquery.blockUI.js"></script>
    <script type="text/javascript" src="js/login.js"></script>
    <link rel="shortcut icon" th:href="@{favicon.ico}"/>
    <link rel="bookmark" th:href="@{favicon.ico}"/>
</head>

<body>
<img alt="" src="images/Spinner-1s-100px.gif" id="loadingSpinner" style="display: none"/>
<div class="login" style="padding: 80px 0;">
    <div class="container">
        <div class="row">
            <div class="col-md-offset-3 col-md-6">
                <form class="form-horizontal" method="post" role="form" th:action="@{login}">
                    <h2 class="heading" th:text="#{login.title.text}"></h2>
                    <div th:if="${param.error}">
                        <div class="alert alert-danger" th:text="#{login.error.text}">
                            无效的用户或密码!
                        </div>
                    </div>
                    <div th:if="${param.logout}">
                        <div class="alert alert-info" th:text="#{login.logout.text}">
                            你已退出登录!
                        </div>
                    </div>
                    <div class="form-group">
                        <input type="text" id="usercode" name="usercode" class="form-control"
                               th:placeholder="#{login.username.placeholder}" required="required"
                               th:oninvalid="#{login.username.oninvalid}"
                               th:oninput="#{login.username.oninput}"
                               autofocus="autofocus"/>
                        <i class="fa fa-user"></i>
                    </div>
                    <div class="form-group help">
                        <input id="password" type="password" name="password"
                               class="form-control"
                               th:placeholder="#{login.password.placeholder}"
                               required="required"
                               th:oninvalid="#{login.password.oninvalid}"
                               th:oninput="#{login.username.oninput}"/>
                        <i class="fa fa-lock"></i>
                        <!--<a href="#" class="fa fa-question-circle"></a>-->
                    </div>
                    <!--<div class="form-group">
                        <select id="userroles" name="userroles" class="form-control" required="required"
                                th:oninvalid="#{login.userroles.oninvalid}"
                                th:oninput="#{login.username.oninput}"></select>
                        <i class="fa fa-group"></i>
                    </div>-->

                    <div class="form-group">
                        <div class="main-checkbox">
                            <input id="remember-me" name="remember-me" type="checkbox"/>
                            <label for="remember-me"></label>
                        </div>
                        <label for="remember-me" class="text" th:text="#{login.rememberme.text}">记住我</label>
                        <button id="submit" name="submit" class="btn" type="submit"
                                th:text="#{login.submit.text}">登录
                        </button>
                        <button id="reset" name="reset" class="btn" type="reset"
                                th:text="#{login.reset.text}">重置
                        </button>
                        <!--<input type="hidden" name="${_csrf.parameterName}"-->
                               <!--value="${_csrf.token}"/>-->
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
</body>
</html>
